<?
$pageName = "scoreEdit";
include ROOT . '/view/common/teacher/header.php';
?>
<div class="container">
	<div class="page-header">
		<br /><br />
		<h2>
			<label><?=CourseClass::load($courseClassId)->course()->name?></label>
		</h2>
	</div>
	<div class="row" style="margin-bottom:30px;">
		<div class="col-xs-12">
			<h3>
				学生<small>共计<?=count($courseSelections)?>个</small>
				<a href="/teacher/courseClasses/" class="btn btn-danger" style="float:right; margin-right:20px">返回课程班列表</a>
			</h3>
			<form class="form-horizontal" role="form" method="post" action="/teacher/update/">
				<input type="hidden" name="courseClassId" value="<?=$courseClassId?>">
				<table class="table table-striped">
					<thead>
					<tr>
						<th>姓名</th>
						<th>学号</th>
						<th>班级</th>
						<th>成绩</th>
					</tr>
					</thead>
					<tbody>
					<? foreach($courseSelections as $courseSelection) {?>
						<tr>
							<td><?=Student::load($courseSelection->studentId)->name?></td>
							<td><?=Student::load($courseSelection->studentId)->studentNo?></td>
							<td><?=Student::load($courseSelection->studentId)->classId?></td>
							<td><input type="text" name='<?=$courseSelection->studentId?>'?></td>
						</tr>
					<?}?>
					</tbody>
				</table>
				<p>&nbsp;</p>
				<div class="form-group">
					<div class="col-sm-offset-0 col-sm-12">
						<button type="submit" class="btn btn-danger btn-lg btn-block">提交！</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<!-- .row -->
<center><div class="subpages row"><ul class="pagination pagination-sm"></ul></div></center>
</div>